StatesManager

interface StatesManager<T : State>

Functions

endChain
Link copied to clipboard
abstract suspend fun endChain(state: T)

Ends chain with context from state. In case when State.context of state is absent, state should be just ignored

getActiveStates
Link copied to clipboard
abstract suspend fun getActiveStates(): List<T>
startChain
Link copied to clipboard
abstract suspend fun startChain(state: T)

Starts chain with state as first State. May returns false in case of State.context of state is already busy by the other State

update
Link copied to clipboard
abstract suspend fun update(old: T, new: T)

Must set current set using State.context

Properties

onChainStateUpdated
Link copied to clipboard
abstract val onChainStateUpdated: Flow<Pair<T, T>>
onEndChain
Link copied to clipboard
abstract val onEndChain: Flow<T>
onStartChain
Link copied to clipboard
abstract val onStartChain: Flow<T>

Inheritors

DefaultStatesManager
Link copied to clipboard